const Router = require('koa-router')

const shortMsgController = require('../../controllers/shortmsg.js')

const m = require('../../middlewares/admin_auth')

const router = new Router({prefix: '/admin/api/v1/shortMsg'})


router.get('/getList', shortMsgController.list)

router.post('/sendmsg/', m.auth, shortMsgController.sendmsg)

router.post('/create/', m.auth, shortMsgController.create)

router.get("/dict", m.auth, shortMsgController.getDict )

router.get('/detail/:id', shortMsgController.detail)


router.delete('/:id', m.auth, shortMsgController.delete)


router.patch('/:id', m.auth, shortMsgController.update)

module.exports = router